package com.nefu.huiyi.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("medical_company_policies")
public class MedicalCompanyPolicy implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("company_id")
    private Long companyId;

    @TableField(exist = false)
    private String companyName;

    @TableField("policy_name")
    private String policyName;

    @TableField("policy_content")
    private String policyContent;



    @TableField("effective_start")
    private LocalDate effectiveStart;

    @TableField("effective_end")
    private LocalDate effectiveEnd;

    /**
     * 状态, 默认为1 (1:有效, 0:无效)
     */
    @TableField("status")
    private Integer status;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}